﻿<?xml version="1.0" encoding="utf-8" ?>
<syntaxes>
  <syntax name="DokuWiki">
    <markup name="emphasis" type="singleLine">
      <regex>
        <from>\/\/([^\s][^\]]*?)\/\/</from>
        <to></to>
      </regex>
      <regex>
        <from>\*\*(.*)\*\*</from>
        <to></to>
      </regex>
      <regex>
        <from>__(.*)__</from>
        <to></to>
      </regex>
    </markup>
    <markup name="headings" type="singleLine">
      <regex>
        <from>^= (.*) =$</from>
        <to>= $1 =</to>
      </regex>
      <regex>
        <from>^== (.*) ==$</from>
        <to>== $1 ==</to>
      </regex>
      <regex>
        <from>^=== (.*) ===$</from>
        <to>=== $1 ===</to>
      </regex>
      <regex>
        <from>^==== (.*) ====$</from>
        <to>==== $1 ====</to>
      </regex>
      <regex>
        <from>^===== (.*) =====$</from>
        <to>===== $1 =====</to>
      </regex>
      <regex>
        <from>^====== (.*) ======$</from>
        <to>====== $1 ======</to>
      </regex>
    </markup>
    <markup name="code" type="singleLine">
      <regex>
        <from><![CDATA[<code>(.*)</code>]]></from>
        <to></to>
      </regex>
      <regex>
        <from><![CDATA[<code (.*)>(.*)</code>]]></from>
        <to></to>
      </regex>
    </markup>
    <markup name="code" type="multiLine">
      <regex>
        <fromOpening><![CDATA[<code (.*)>]]></fromOpening>
        <fromClosing><![CDATA[</code>]]></fromClosing>
        <fromInside>(.*)</fromInside>
        <toOpening></toOpening>
        <toClosing></toClosing>
        <toInside></toInside>
      </regex>
    </markup>
    <markup name="color" type="singleLine">
      <regex>
        <from><![CDATA[<fc (.*)>(.*)</fc>]]></from>
        <to><![CDATA[<fc $1>$2</fc>]]></to>
      </regex>
    </markup>
    <markup name="lineBreak" type="singleLine">
      <regex>
        <from><![CDATA[\\\\$]]></from>
        <to></to>
      </regex>
    </markup>
  </syntax>
  <syntax name="MarkDown">
    <markup name="emphasis" type="singleLine">
      <regex>
        <from>^\*([^\s][^\]]*?)\*</from>
        <to>*$1*</to>
      </regex>
      <regex>
        <from></from>
        <to>**$1**</to>
      </regex>
      <regex>
        <from></from>
        <to>_$1_</to>
      </regex>
    </markup>
    <markup name="headings" type="singleLine">
      <regex>
        <from></from>
        <to>###### $1</to>
      </regex>
      <regex>
        <from></from>
        <to>##### $1</to>
      </regex>
      <regex>
        <from></from>
        <to>#### $1</to>
      </regex>
      <regex>
        <from></from>
        <to>### $1</to>
      </regex>
      <regex>
        <from></from>
        <to>## $1</to>
      </regex>
      <regex>
        <from></from>
        <to># $1</to>
      </regex>
    </markup>
    <markup name="code" type="singleLine">
      <regex>
        <from></from>
        <to>`$1`</to>
      </regex>
      <regex>
        <from></from>
        <to>`$2`</to>
      </regex>
    </markup>
    <markup name="code" type="multiLine">
      <regex>
        <fromOpening></fromOpening>
        <fromClosing></fromClosing>
        <fromInside></fromInside>
        <toOpening></toOpening>
        <toClosing></toClosing>
        <toInside><![CDATA[    $1]]></toInside>
      </regex>
    </markup>
    <markup name="color" type="singleLine">
      <regex>
        <from></from>
        <to>$2</to>
      </regex>
    </markup>
    <markup name="lineBreak" type="singleLine">
      <regex>
        <from></from>
        <to><![CDATA[  ]]></to>
      </regex>
    </markup>
  </syntax>
</syntaxes>